﻿<%@ Page Language="C#" MasterPageFile="~/web.master" AutoEventWireup="true" CodeBehind="summary_period.aspx.cs" Inherits="Shuba.Web.master.summary_period"%>
<%@ Register Assembly="Shuba.Framework" Namespace="Shuba.Framework" TagPrefix="cc" %>
<asp:Content ID="Header1" ContentPlaceHolderID="HeaderPlaceHolder" runat="server">
<script type="text/javascript">
	function PrintThis(region_code, region_name, cluster_code, cluster_name, unit_code, unit_name, start, end) 
	{
	    var param = "region_code=" + region_code + "&region_name='" + region_name + "'&cluster_code=" + cluster_code + "&cluster_name='" + cluster_name + "'&unit_code=" + unit_code + "&unit_name='" + unit_name + "'&start=" + start+ "&end=" + end;
		window.open("summary_period_excel.aspx?" + param);
		//alert(region_code + " , " + region_name + " , " + cluster_code + " , " + cluster_name + " , " + unit_code + " , " + unit_name + " , " + tahun + " , " + bulan);
	}
</script>
</asp:Content>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <table class="text" border="0" width="100%" cellspacing="0" cellpadding="2">
        <tr>
            <td class="text bg_content" bgcolor="#FFFFFF" align="center">
                <p>
                    &nbsp;</p>
                <table class="black" border="0" width="95%" cellspacing="0" cellpadding="0">
                    <tr>
                        <td class="title_back" align="left">
					    <table class="text" border="0" width="100%" cellspacing="0" cellpadding="0">
					    <tr>
					    <td class="title_back2" width="2%">&nbsp;</td>
					    <td class="title_back2 title_white" width="38%"><asp:Label ID="LabelTitle" runat="server" Text="Label"></asp:Label></td>
					    <td><span class="title_right"></span></td>
					    </tr>
					    </table>
                        </td>
                        <td class="title_back" align="right">&nbsp;</td>
                    </tr>
                    <tr>
                        <td class="border_left bg_subtitle_white">&nbsp;&nbsp;&nbsp;</td>
                        <td class="border_right bg_subtitle" align="right">&nbsp;</td>
                    </tr>
                    <tr>
                        <td colspan="2">
                        
                        <table width=100% class="black border" border="0" cellspacing="0" cellpadding="2">
                        <tr>
                            <td class="bg_grid" align="right">&nbsp;</td>
                            <td class="bg_grid2" align="left">&nbsp;</td>
                        </tr>
						 <tr>
						    <td class="bg_grid" align="right">REGION</td>
						    <td class="bg_grid2" align="left">
						    <asp:DropDownList ID="ddlRegion" AutoPostBack="true" runat="server" Width="285px" CssClass="text" OnSelectedIndexChanged="ddlRegion_SelectedIndexChanged"></asp:DropDownList>&nbsp;
						    </td>
						 </tr>
						 <tr>
						    <td class="bg_grid" align="right">CLUSTER</td>
						    <td class="bg_grid2" align="left">
                            <asp:UpdatePanel ID="UpdatePanel1" runat="server">
                            <ContentTemplate>
                            <asp:DropDownList ID="ddlCluster" AutoPostBack="true" runat="server" Width="285px" CssClass="text" OnSelectedIndexChanged="ddlCluster_SelectedIndexChanged"></asp:DropDownList>&nbsp;
                            </ContentTemplate>
                            <Triggers>
                            <asp:AsyncPostBackTrigger ControlID="ddlRegion" EventName="SelectedIndexChanged"/>
                            </Triggers>
                            </asp:UpdatePanel>
                            </td>
                          </tr>
						 <tr>
						    <td class="bg_grid" align="right">UNIT</td>
						    <td class="bg_grid2" align="left">
                            <asp:UpdatePanel ID="UpdatePanel3" runat="server">
                            <ContentTemplate>
                            <asp:DropDownList ID="ddlUnit" runat="server" Width="285px" CssClass="text" 
                                    onselectedindexchanged="ddlUnit_SelectedIndexChanged"></asp:DropDownList>&nbsp;
                            </ContentTemplate>
                            <Triggers>
                            <asp:AsyncPostBackTrigger ControlID="ddlCluster" EventName="SelectedIndexChanged"/>
                            </Triggers>
                            </asp:UpdatePanel>
                            </td>
                        </tr>
                        <tr>
						    <td class="bg_grid" align="right" width="18%">PERIOD</td>
						    <td class="bg_grid2" align="left">
						    <cc:DatePicker ID="txtStartDate" imgDirectory="../images/" ControlCssClass="text" CssClass="text" runat="server"></cc:DatePicker>
						    &nbsp;to&nbsp;
						    <cc:DatePicker ID="txtToDate" imgDirectory="../images/" ControlCssClass="text" CssClass="text" runat="server"></cc:DatePicker>
						    </td>
						</tr>						
                        <tr>
                            <td class="bg_grid" align="right">&nbsp;</td>
                            <td class="bg_grid2" align="left">
                                <table border=0 cellpadding=0 cellspacing=0>
                                <tr>
                                <td>
    						        <asp:UpdatePanel ID="UpdatePanel5" runat="server">
                                    <ContentTemplate>
					                    <asp:Button ID="btnSearch" CssClass="buttonsmall" runat="server" Text="Search" OnClick="btnSearch_Click" />&nbsp;
					                </ContentTemplate>
					                <Triggers>
                                        <asp:AsyncPostBackTrigger ControlID="ddlUnit" EventName="SelectedIndexChanged"/>
                                    </Triggers>
					                </asp:UpdatePanel>
                                </td>
                                <td>
                                <asp:UpdatePanel ID="UpdatePanel4" runat="server">
                                <ContentTemplate>
                                    <asp:Button ID="btnExcel" CssClass="button" runat="server" Text="Export to Excel" onclick="btnExcel_Click" />&nbsp;&nbsp;						    
                                </ContentTemplate>
                                <Triggers>
                                    <asp:AsyncPostBackTrigger ControlID="btnSearch" EventName="Click"/>
                                </Triggers>
                                </asp:UpdatePanel>
                                </td>
                                </tr>
                                </table>
                            </td>
                        </tr>
                        <tr>
                            <td class="bg_grid" align="right">&nbsp;</td>
                            <td class="bg_grid2" align="left">&nbsp;</td>
                        </tr>
                        </table>
                        </td>
                        <tr>
                        <td class="border" colspan=2>
                        <asp:UpdatePanel ID="UpdatePanel2" runat="server">
                            <ContentTemplate>
                            <cc:SHUBAGrid ID="gvList" runat="server" AutoGenerateColumns="False" Width="100%" DataKeyNames="ROW_ID">
                                <Columns>
                                    <asp:BoundField DataField="ITEM" HeaderText="ITEM" ItemStyle-HorizontalAlign=Center />
                                    <asp:BoundField DataField="THIS_MONTH" HeaderText="THIS PERIOD" ItemStyle-HorizontalAlign=Center />
                                    <asp:BoundField DataField="PREV_MONTH" HeaderText="PREV. PERIOD" ItemStyle-HorizontalAlign=Center />
                                    <asp:BoundField DataField="TOTAL" HeaderText="TOTAL" ItemStyle-HorizontalAlign=Center />
                                </Columns>
                                <PagerSettings />
                                <EmptyDataTemplate>
                                    <table class="text" width=100% cellpadding=0 cellspacing=0><tr><td class="bg_grid2" align=center>NO RECORD FOUND</td></tr></table>
                                </EmptyDataTemplate>
                            </cc:SHUBAGrid>
                        </ContentTemplate>
                        <Triggers>
                            <asp:AsyncPostBackTrigger ControlID="gvList" EventName="PageIndexChanging"/>
                            <asp:AsyncPostBackTrigger ControlID="btnSearch" EventName="Click"/>
                        </Triggers>
                        </asp:UpdatePanel>
                        </td>
                     </tr>
                   </table>
                </td>
            </tr>
        </table>

<asp:UpdateProgress ID="UpdateProgress1" runat="server">
    <ProgressTemplate>
    <div class="progressBackgroundFilter"></div>
    <asp:Panel ID="pnlPopup" runat="server" CssClass="progress_popup">
    <div class="container_popup">
        <div class="header_popup">Generating Output, please wait...</div>
        <div class="body_popup">
            <img src="../images/activity.gif" />
        </div>
    </div>
    </asp:Panel>
    </ProgressTemplate>
</asp:UpdateProgress>

</asp:Content>
